3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next
QuickDraw 3D defines three- and four-dimensional rational points as pairs and triples of floating-point numbers, together with a floating-point weight. You'll use the TQ3RationalPoint4D data type for defining control points of rational surfaces and solids. The TQ3RationalPoint4D data type represents homogeneous points in four-dimensional space. To get the equivalent three-dimensional point, divide the point's x , y , and z components by the w component. You'll use the TQ3RationalPoint3D data type to define control points of NURB trim curves.
typedef struct TQ3RationalPoint3D {
float x;
float y;
float w;
} TQ3RationalPoint3D;
typedef struct TQ3RationalPoint4D {
float x;
float y;
float z;
float w;
} TQ3RationalPoint4D;
Previous | QD3D Book | Overview | Chapter Contents | Next